import * as puppeteer from 'puppeteer';
import { Step } from '../service/PuppeteerImp';
export default interface Puppteer{
    browser:puppeteer.Browser;
    page:puppeteer.Page;
    
    //初始化
    init():Promise<void>;

    //截图URL
    getShotUrl(url:string):Promise<string>;

    //选择dom
    selectDom(selector:string):Promise<puppeteer.ElementHandle<Element>>;
    selectDoms(selector:string):Promise<puppeteer.ElementHandle<Element>[]>;

    //点击截图事件
    clickThenShot(selector:string):Promise<Step>;

    //触摸截图事件
    tapThenShot(selector:string):Promise<Step>;

    //截图
    shot(shotName:string,shotOpt:puppeteer.ScreenshotOptions):Promise<void>;

    //输入框输入
    inputValue(selector:string,value:string,shotName?:string,):Promise<Step>;

    //关闭浏览器
    closeBrowser();
}
export interface Size{
    width:number,
    height:number
}
export interface Opt extends puppeteer.LaunchOptions{
    executablePath:string,
    headless:boolean
}